﻿(function () {

    var root = this;

    define3rdPartyModules();
    loadPluginsAndBoot();

    //boot();

    function define3rdPartyModules() {
        
        // These are already loaded via bundles. 
        // We define them and put them in the root object.
        define('jquery', [], function () { return root.jQuery; });
        define('ko', [], function () { return root.ko; });
        define('infuser', [], function () { return root.infuser; });
        define('toastr', [], function () { return root.toastr; });
        define('sele', [], function () { return root.sele; });
        define('regexMask', [], function () { return root.regexMask; });
    }

    function loadPluginsAndBoot() {
        // Plugins must be loaded after jQuery and Knockout, 
        // since they depend on them.
       
        
        requirejs([
               // 'Scripts/ko.bindings.js',
                'Scripts/koGrid-2.1.1.debug.js',
                'Scripts/jquery-ui-1.10.3.custom.js',
                'Scripts/Common/ko.bindings.js',
                'Scripts/Common/utils.js',
                'Scripts/Common/dialog.js',
                'Scripts/Common/formActions.js'
                
        ], boot);
    }

    function boot() {
        require(['bootstrapper'], function (bs) {
            bs.run(); });
    }
})();




    